package net.thellium.ddiameter.protocol.avp.parser;

import java.util.HashMap;
import java.util.Map;

import net.thellium.ddiameter.protocol.AVPType;

public class ParserRepository {
	private static Map<AVPType, AVPValueParser> parsers = new HashMap<AVPType, AVPValueParser>();
	static {
		parsers.put(AVPType.OctetString, new OctetStringParser());
		parsers.put(AVPType.Float32, new Float32Parser());
		parsers.put(AVPType.Float64, new Float64Parser());
		parsers.put(AVPType.Integer32, new Integer32Parser());
		parsers.put(AVPType.Integer64, new Integer64Parser());
	}
	public static AVPValueParser getParser(AVPType type) {
		return parsers.get(type);
	}

}

